<?php

if (!defined('BASEPATH'))
	exit('No direct script access allowed');

class Ajax_basedata extends CI_Controller {

	function __construct() {

		parent::__construct();
		$this -> load -> model('object_model');
		$this -> load -> model('market_state_model');
		$this -> load -> model('insert_model');
		$this -> load -> model('windows_model');
		//Object_usage_model
		$this -> load -> model('object_styles_model');
		//public_facilities_model
		$this -> load -> model('public_facilities_model');
		$this -> load -> model('affiliated_with_model');
		//Management_model
		$this -> load -> model('management_model');
		
		$this -> load -> model('customer_source_model');
		$this -> load -> model('partition_the_model');
		$this -> load -> model('land_use_zoning_model');
		//Land_use_zoning_model
		//partition_the_model
		//customer_source_model

	}

	//落地窗座向
	public function windows_json() {

		$query = trim($this -> input -> get('query'));
		$market_state = $this -> windows_model -> get_not_in2($query);
		echo urldecode(json_encode($market_state));

	}

	//物件型式
	public function object_stype() {

		$query = trim($this -> input -> get('query'));
		$market_state = $this -> object_styles_model -> get_not_in2($query);
		echo urldecode(json_encode($market_state));

	}

	//物件型式
	public function public_facilities() {

		$query = trim($this -> input -> get('query'));
		$market_state = $this -> public_facilities_model -> get_not_in($query);
		echo urldecode(json_encode($market_state));

	}

	//附屬配備
	public function accessories_with() {

		$query = trim($this -> input -> get('query'));
		$market_state = $this -> affiliated_with_model -> get_not_in($query);
		echo urldecode(json_encode($market_state));

	}

	//附屬配備
	public function management() {

		$query = trim($this -> input -> get('query'));
		$market_state = $this -> management_model -> get_not_in2($query);
		echo urldecode(json_encode($market_state));

	}
	
	//客戶來源
	public function customer_source() {

		$query = trim($this -> input -> get('query'));
		$market_state = $this -> customer_source_model -> get_not_in2($query);
		echo urldecode(json_encode($market_state));

	}

	//客戶來源
	public function partition_the() {
		
		
		$query = trim($this -> input -> get('query'));
		$market_state = $this -> land_use_zoning_model -> get_not_in2($query);
		echo urldecode(json_encode($market_state));

	}

}
?>